package chapter6;

/**
 * Created by lenovo on 2016/3/24.
 */
public class RPG3 {
    public static void main(String[] args){

        SwordsMan2 swordsMan=new SwordsMan2();
        swordsMan.setName("Justin");
        swordsMan.setLevel(1);
        swordsMan.setBlood(200);

        Magician2 magician=new Magician2();
        magician.setName("Monica");
        magician.setLevel(1);
        magician.setBlood(100);

        drawFight(swordsMan);
        drawFight(magician);
    }


    static void drawFight(Role role){

        System.out.print(role.getName());
        role.fight();

    }
}
